home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / tex / lametex_.z / lametex_ / lametex / src / Label.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-07  |  752 b   |  41 lines

  1. /* Label.h
  2.  *
  3.  * Stores user-defined labels for backwards and forwards referencing with
  4.  * the \ref and \pageref commands.
  5.  *
  6.  * Copyright 1992 Jonathan Monsarrat. Permission given to freely distribute,
  7.  * edit and use as long as this copyright statement remains intact.
  8.  *
  9.  */
  10.  
  11. const MAXLABELS = 100;
  12.  
  13. class Label {
  14.   public:
  15.      char *_name;
  16.      int _chapter;
  17.      int _section;
  18.      int _referenced;
  19.      
  20.      Label(char *,int,int);
  21.      ~Label();
  22.      match(char *);
  23. };
  24.  
  25. class Labels {
  26.      enum LabelContents {
  27.       Chapter,
  28.       Section
  29.      };
  30.      int numlabels;
  31.      Label *label[MAXLABELS];
  32.      int unknown_references;
  33.  
  34. public:
  35.      Labels();
  36.      ~Labels();
  37.      void add_label(char *);
  38.      void print_ref(char *);
  39.      void shutdown();
  40. };
  41.